package com.xuetang9.t9.xinhuaxia.beans;

import org.springframework.web.multipart.MultipartFile;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

@Table(name = "goods")
public class Goods implements Serializable {
    /**
     * 商品ID
     */
    @Id
    @Column(name = "goodsId")
    private Long goodsid;

    /**
     * 商品名称
     */
    @Column(name = "goodsName")
    private String goodsname;

    /**
     * 一级分类id
     */
    @Column(name = "goodsFirstCategoryId")
    private Long goodsfirstcategoryid;

    private FirstCategory firstCategory;

    /**
     * 二级分类id
     */
    @Column(name = "goodsSecondCategoryId")
    private Long goodssecondcategoryid;

    private SecondCategory secondCategory;

    /**
     * 品牌名称
     */
    @Column(name = "goodsBrand")
    private String goodsbrand;

    /**
     * 商品折扣（1-10,10为原价）
     */
    @Column(name = "goodsDiscount")
    private Integer goodsdiscount;

    /**
     * 商品价格
     */
    @Column(name = "goodsPrice")
    private Double goodsprice;

    /**
     * 商品状态（上架、下架）
     */
    @Column(name = "goodsStatus")
    private Integer goodsstatus;

    /**
     * 商品标签
     */
    @Column(name = "goodsLabel")
    private String goodslabel;

    private MultipartFile[] goodsPicFiles;

    private List<GoodsPicturepath> goodsPicturepaths;

    @Override
    public String toString() {
        return "Goods{" +
                "goodsid=" + goodsid +
                ", goodsname='" + goodsname + '\'' +
                ", goodsfirstcategoryid=" + goodsfirstcategoryid +
                ", firstCategory=" + firstCategory +
                ", goodssecondcategoryid=" + goodssecondcategoryid +
                ", secondCategory=" + secondCategory +
                ", goodsbrand='" + goodsbrand + '\'' +
                ", goodsdiscount=" + goodsdiscount +
                ", goodsprice=" + goodsprice +
                ", goodsstatus=" + goodsstatus +
                ", goodslabel='" + goodslabel + '\'' +
                ", goodsPicFiles=" + Arrays.toString(goodsPicFiles) +
                ", goodsPicturepaths=" + goodsPicturepaths +
                '}';
    }

    public MultipartFile[] getGoodsPicFiles() {
        return goodsPicFiles;
    }

    public void setGoodsPicFiles(MultipartFile[] goodsPicFiles) {
        this.goodsPicFiles = goodsPicFiles;
    }

    public List<GoodsPicturepath> getGoodsPicturepaths() {
        return goodsPicturepaths;
    }

    public void setGoodsPicturepaths(List<GoodsPicturepath> goodsPicturepaths) {
        this.goodsPicturepaths = goodsPicturepaths;
    }

    public FirstCategory getFirstCategory() {
        return firstCategory;
    }

    public void setFirstCategory(FirstCategory firstCategory) {
        this.firstCategory = firstCategory;
    }

    public SecondCategory getSecondCategory() {
        return secondCategory;
    }

    public void setSecondCategory(SecondCategory secondCategory) {
        this.secondCategory = secondCategory;
    }

    /**
     * 获取商品ID
     *
     * @return goodsId - 商品ID
     */
    public Long getGoodsid() {
        return goodsid;
    }

    /**
     * 设置商品ID
     *
     * @param goodsid 商品ID
     */
    public void setGoodsid(Long goodsid) {
        this.goodsid = goodsid;
    }

    /**
     * 获取商品名称
     *
     * @return goodsName - 商品名称
     */
    public String getGoodsname() {
        return goodsname;
    }

    /**
     * 设置商品名称
     *
     * @param goodsname 商品名称
     */
    public void setGoodsname(String goodsname) {
        this.goodsname = goodsname;
    }

    /**
     * 获取一级分类id
     *
     * @return goodsFirstCategoryId - 一级分类id
     */
    public Long getGoodsfirstcategoryid() {
        return goodsfirstcategoryid;
    }

    /**
     * 设置一级分类id
     *
     * @param goodsfirstcategoryid 一级分类id
     */
    public void setGoodsfirstcategoryid(Long goodsfirstcategoryid) {
        this.goodsfirstcategoryid = goodsfirstcategoryid;
    }

    /**
     * 获取二级级分类id
     *
     * @return goodsSecondCategoryId - 二级级分类id
     */
    public Long getGoodssecondcategoryid() {
        return goodssecondcategoryid;
    }

    /**
     * 设置二级级分类id
     *
     * @param goodssecondcategoryid 二级级分类id
     */
    public void setGoodssecondcategoryid(Long goodssecondcategoryid) {
        this.goodssecondcategoryid = goodssecondcategoryid;
    }

    /**
     * 获取品牌名称
     *
     * @return goodsBrand - 品牌名称
     */
    public String getGoodsbrand() {
        return goodsbrand;
    }

    /**
     * 设置品牌名称
     *
     * @param goodsbrand 品牌名称
     */
    public void setGoodsbrand(String goodsbrand) {
        this.goodsbrand = goodsbrand;
    }

    /**
     * 获取商品折扣（1-10,10为原价）
     *
     * @return goodsDiscount - 商品折扣（1-10,10为原价）
     */
    public Integer getGoodsdiscount() {
        return goodsdiscount;
    }

    /**
     * 设置商品折扣（1-10,10为原价）
     *
     * @param goodsdiscount 商品折扣（1-10,10为原价）
     */
    public void setGoodsdiscount(Integer goodsdiscount) {
        this.goodsdiscount = goodsdiscount;
    }

    /**
     * 获取商品价格
     *
     * @return goodsPrice - 商品价格
     */
    public Double getGoodsprice() {
        return goodsprice;
    }

    /**
     * 设置商品价格
     *
     * @param goodsprice 商品价格
     */
    public void setGoodsprice(Double goodsprice) {
        this.goodsprice = goodsprice;
    }

    /**
     * 获取商品状态（上架、下架）
     *
     * @return goodsStatus - 商品状态（上架、下架）
     */
    public Integer getGoodsstatus() {
        return goodsstatus;
    }

    /**
     * 设置商品状态（上架、下架）
     *
     * @param goodsstatus 商品状态（上架、下架）
     */
    public void setGoodsstatus(Integer goodsstatus) {
        this.goodsstatus = goodsstatus;
    }

    /**
     * 获取商品标签
     *
     * @return goodsLabel - 商品标签
     */
    public String getGoodslabel() {
        return goodslabel;
    }

    /**
     * 设置商品标签
     *
     * @param goodslabel 商品标签
     */
    public void setGoodslabel(String goodslabel) {
        this.goodslabel = goodslabel;
    }

}